Telegram Group & Telegram Channel
🚀 Как ускорить ASP.NET Core API: 6 рабочих приёмов

Если ваш API на .NET тормозит под нагрузкой — вот краткий гайд, как прокачать его производительность. ):

1. Async/await везде
Избегай .Result и .Wait() — они блокируют потоки. Асинхронность улучшает масштабируемость.

📉 2. Добавь пагинацию
Не отдавай 10 000 записей за раз. Параметры page и pageSize — must-have для любых списков.

🚫 3. Используй `AsNoTracking` в EF Core
Если данные не редактируются — отключай отслеживание изменений. Это экономит память и ускоряет запросы.

📦 4. Включи сжатие ответов
Подключи Gzip или Brotli, особенно если отдаёшь большие JSON-объекты.

🧠 5. Кэшируй часто запрашиваемые данные
Используй IMemoryCache или Redis — уменьши нагрузку на базу.

📤 6. Передавай DTO, а не сущности
Не светите внутренними моделями. Создавай DTO и отправляй только нужные поля.

🧪 Подробнее с примерами кода — в оригинальном сайде:
https://dev.to/this-is-learning/tips-for-improving-api-performance-in-aspnet-core-n4o

@csharp_ci



tg-me.com/csharp_ci/1392
Create:
Last Update:

🚀 Как ускорить ASP.NET Core API: 6 рабочих приёмов

Если ваш API на .NET тормозит под нагрузкой — вот краткий гайд, как прокачать его производительность. ):

1. Async/await везде
Избегай .Result и .Wait() — они блокируют потоки. Асинхронность улучшает масштабируемость.

📉 2. Добавь пагинацию
Не отдавай 10 000 записей за раз. Параметры page и pageSize — must-have для любых списков.

🚫 3. Используй `AsNoTracking` в EF Core
Если данные не редактируются — отключай отслеживание изменений. Это экономит память и ускоряет запросы.

📦 4. Включи сжатие ответов
Подключи Gzip или Brotli, особенно если отдаёшь большие JSON-объекты.

🧠 5. Кэшируй часто запрашиваемые данные
Используй IMemoryCache или Redis — уменьши нагрузку на базу.

📤 6. Передавай DTO, а не сущности
Не светите внутренними моделями. Создавай DTO и отправляй только нужные поля.

🧪 Подробнее с примерами кода — в оригинальном сайде:
https://dev.to/this-is-learning/tips-for-improving-api-performance-in-aspnet-core-n4o

@csharp_ci

BY C# (C Sharp) programming




Share with your friend now:
tg-me.com/csharp_ci/1392

View MORE
Open in Telegram


C C Sharp programming Telegram | DID YOU KNOW?

Date: |

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

Look for Channels Online

You guessed it – the internet is your friend. A good place to start looking for Telegram channels is Reddit. This is one of the biggest sites on the internet, with millions of communities, including those from Telegram.Then, you can search one of the many dedicated websites for Telegram channel searching. One of them is telegram-group.com. This website has many categories and a really simple user interface. Another great site is telegram channels.me. It has even more channels than the previous one, and an even better user experience.These are just some of the many available websites. You can look them up online if you’re not satisfied with these two. All of these sites list only public channels. If you want to join a private channel, you’ll have to ask one of its members to invite you.

C C Sharp programming from sg


Telegram C# (C Sharp) programming
FROM USA